<%@ page language="java" contentType="text/html;charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<head>
    <jsp:include page="../common/common.jsp"/>
</head>
<body class="page-header-fixed">
<jsp:include page="../common/header.jsp"/>
<div class="clearfix">
</div>
<div class="page-container">
    <div class="page-sidebar-wrapper"><jsp:include page="../common/menu.jsp"/></div>
    <div class="page-content-wrapper">
        <div class="page-content">
            <div class="row">
                <div class="col-md-12">                                    
                    <form class="form-horizontal form-row-seperated" id="form" method="post" action="${path}/serverPoint/save">
                        <div class="portlet box purple">
                        
                            <div class="portlet-title">
                                <div class="caption">
                                    <i class="fa fa-shopping-cart"></i>邮政服务网点详细内容
                                </div>
                                <div class="actions btn-set">
                                    <a href="javascript:history.go(-1);" class="btn default"><i
                                            class="fa fa-angle-left"></i> 返回</a>
                                    <a href="javascript:location.reload();" class="btn green"><i
                                            class="fa fa-reply"></i> 重置</a>
                                    <button type="button" onclick="save()" class="btn blue"><i class="fa fa-check"></i> 保存
                                    </button>
                                </div>
                            </div>
                            
                            <div class="portlet-body">                        
                                <div class="tabbable">
                                    <div class="tab-content no-space">
                                        <div class="tab-pane active" id="tab_general">
                                        
                                            <div class="form-body">
                                                <div class="form-group">
                                                    <label class="col-md-1 control-label">分公司:</label>    
			                                        <div class="col-md-2">
			                                             <select id="node" name="node" class="form-control">   
			                                                <option value="">请选择</option>
			                                                <option value="郊区分公司" <c:if test="${data.node eq '郊区分公司'}"> selected="selected"</c:if>>郊区分公司</option>
			                                                <option value="营业分公司" <c:if test="${data.node eq '营业分公司'}"> selected="selected"</c:if>>营业分公司</option>
			                                                <option value="襄州区" <c:if test="${data.node eq '襄州区'}"> selected="selected"</c:if>>襄州区</option>
			                                                <option value="老河口" <c:if test="${data.node eq '老河口'}"> selected="selected"</c:if>>老河口</option>
			                                                <option value="宜城" <c:if test="${data.node eq '宜城'}"> selected="selected"</c:if>>宜城</option>
			                                                <option value="枣阳" <c:if test="${data.node eq '枣阳'}"> selected="selected"</c:if>>枣阳</option>
			                                                <option value="谷城" <c:if test="${data.node eq '谷城'}"> selected="selected"</c:if>>谷城</option>
			                                                <option value="保康" <c:if test="${data.node eq '保康'}"> selected="selected"</c:if>>保康</option>
			                                                <option value="南漳" <c:if test="${data.node eq '南漳'}"> selected="selected"</c:if>>南漳</option>                                        
			                                        	</select>
			                                        </div>
			                                        
			                                        <label class="col-md-1 control-label">区域:
			                                        </label>   
			                                        <div class="col-md-2">
		                                                <select id="area" name="area" class="form-control">
		                                                	<option value="">请选择</option>
			                                                <option value="襄阳城区" <c:if test="${data.area eq '襄阳城区'}"> selected="selected"</c:if>>襄阳城区</option>
			                                                <option value="襄州区" <c:if test="${data.area eq '襄州区'}"> selected="selected"</c:if>>襄州区</option>
			                                                <option value="老河口" <c:if test="${data.area eq '老河口'}"> selected="selected"</c:if>>老河口</option>
			                                                <option value="宜城" <c:if test="${data.area eq '宜城'}"> selected="selected"</c:if>>宜城</option>
			                                                <option value="枣阳" <c:if test="${data.area eq '枣阳'}"> selected="selected"</c:if>>枣阳</option>
			                                                <option value="谷城" <c:if test="${data.area eq '谷城'}"> selected="selected"</c:if>>谷城</option>
			                                                <option value="保康" <c:if test="${data.area eq '保康'}"> selected="selected"</c:if>>保康</option>
			                                                <option value="南漳" <c:if test="${data.area eq '南漳'}"> selected="selected"</c:if>>南漳</option>                                        
		                                            	</select>
			                                        </div>			                                        
			                                        <label class="col-md-1 control-label">网点名称:
			                                        </label>
			                                        <div class="col-md-2">
			                                            <input type="text" id="name" name="name" class="form-control" value="${data.name}"/>
			                                        </div>  
                                                </div>
                                                
                                                <div class="form-group">
                                                   <label class="col-md-1 control-label">地址:
                                                   </label>
			                                        <div class="col-md-2">
			                                            <input type="text" id="address" name="address" class="form-control" value="${data.address}"/>  
			                                        </div>    
                                                    <label class="col-md-1 control-label">开办业务:
                                                    </label>
                                                    <div class="col-md-2">
                                                        <input type="text" id="scope" name="scope"
                                                               class="form-control measure-input" 
                                                               value="${data.scope}"/>
                                                    </div>
                                                    <label class="col-md-1 control-label">营业时间:</label>
			                                        <div class="col-md-2">
			                                            <input type="text" id="ontime" name="ontime" class="form-control" value="${data.ontime}"/>  
			                                        </div>                                                   
                                                </div>
                                                                                                                                               
                                                <div class="form-group">
                                                	<label class="col-md-1 control-label">电话:</label>
			                                        <div class="col-md-2">
			                                            <input type="text" id="tel" name="tel" class="form-control" value="${data.tel}"/>   
			                                        </div>	
                                                	<label class="col-md-1 control-label">区域面积:</label>
			                                        <div class="col-md-2">
			                                            <input type="text" id="mianji" name="mianji" class="form-control" value="${data.mianji}"/>   
			                                        </div>
			                                        <label class="col-md-1 control-label">区域人口:</label>
			                                        <div class="col-md-2">
			                                            <input type="text" id="renkou" name="renkou" class="form-control" value="${data.renkou}"/>  
			                                        </div>	
			                                        	                                     
                                                </div>
                                                
                                                <div class="form-group">
                                                	<label class="col-md-1 control-label">邮政编码:</label>
			                                        <div class="col-md-2">
			                                            <input type="text" id="zipcode" name="zipcode" class="form-control" value="${data.zipcode}"/>   
			                                        </div>
			                                        <label class="col-md-1 control-label">服务半径:</label>
			                                        <div class="col-md-2">
			                                            <input type="text" id="fuwubanj" name="fuwubanj" class="form-control" value="${data.fuwubanj}"/>   
			                                        </div>
			                                        <label class="col-md-1 control-label">服务人口:</label>
			                                        <div class="col-md-2">
			                                            <input type="text" id="fuwurenkou" name="fuwurenkou" class="form-control" value="${data.fuwurenkou}"/>  
			                                        </div>
			                                         
                                                </div>
                                                
                                                <div class="form-group">
                                               		<label class="col-md-1 control-label">周投递次数:</label>
			                                        <div class="col-md-2">
			                                            <input type="text" id="postime" name="postime" class="form-control" value="${data.postime}"/>   
			                                        </div>
                                                	<label class="col-md-1 control-label">经度:</label>
			                                        <div class="col-md-2">
			                                            <input type="text" id="lng" name="lng" class="form-control" value="${data.lng}"/>  
			                                        </div>
			                                        <label class="col-md-1 control-label">纬度:</label>
			                                        <div class="col-md-2">
			                                            <input type="text" id="lat" name="lat" class="form-control" value="${data.lat}"/>   
			                                        </div>				                                        		                                     
                                                </div>
                                                                                         
	                                            <div class="form-group">
	                                                <label class="col-md-1 control-label">内容:</label>
	
	                                                <div class="col-md-8">
	                                                    <input id="context" type="hidden" name="context">
	                                                    <script id="editor" type="text/plain"
	                                                            style="height:500px;">${data.context}</script>
	                                                </div>
	                                            </div>
	                                            
	                                            <div class="form-group">
	                                            	<label class="col-md-1 control-label">备注:</label>
	                                            	<div class="col-md-2">
			                                            <input type="textarea" id="remark" name="remark" rows="10" cols="10"class="form-control"/>   
			                                        </div>
	                                            </div>
	                                      </div>                                                   
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="portlet-title">
                                <div class="actions btn-set">
                                    <a href="javascript:history.go(-1);" class="btn default"><i
                                            class="fa fa-angle-left"></i> 返回</a>
                                    <a href="javascript:location.reload();" class="btn green"><i
                                            class="fa fa-reply"></i> 重置</a>
                                    <button type="button" onclick="save()" class="btn blue"><i class="fa fa-check"></i> 保存
                                    </button>
                                </div>
                            </div>
                        </div>
                        <input type="hidden" id="id" name="id" value="${data.id}">
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<jsp:include page="../common/footer.jsp"/>
<script type="text/javascript" src="${path}/assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js"></script>
<script type="text/javascript" src="${path}/assets/plugins/jquery-inputmask/jquery.inputmask.bundle.min.js"></script>
<script type="text/javascript" src="${path}/assets/plugins/jquery.input-ip-address-control-1.0.min.js"></script>
<script type="text/javascript" src="${path}/assets/plugins/jquery.pwstrength.bootstrap/src/pwstrength.js"></script>
<script type="text/javascript" src="${path}/assets/scripts/biz/ajaxfileupload.js"></script>
<script type="text/javascript" src="${path}/assets/plugins/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="${path}/assets/plugins/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" src="${path}/assets/plugins/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" src="${path}/assets/plugins/district/linkagesel-min.js"></script>

<script>
    var operType = '${operType}';
    var editor, form;
    $(function() {            
        UE.getEditor('editor');
        form = $("form").Validform({
            tiptype: function (msg, o, cssctl) {
                //msg：提示信息;
                //o:{obj:*,type:*,curform:*}, obj指向的是当前验证的表单元素（或表单对象），type指示提示的状态，值为1、2、3、4， 1：正在检测/提交数据，2：通过验证，3：验证失败，4：提示ignore状态, curform为当前form对象;
                //cssctl:内置的提示信息样式控制函数，该函数需传入两个参数：显示提示信息的对象 和 当前提示的状态（既形参o中的type）;
                if (!o.obj.is("form")) {//验证表单元素时o.obj为该表单元素，全部验证通过提交表单时o.obj为该表单对象;
                    var objtip = o.obj.siblings(".Validform_checktip");
                    cssctl(objtip, o.type);
                    objtip.text(msg);
                } else {
                    var objtip = o.obj.find("#msgdemo");
                    cssctl(objtip, o.type);
                    objtip.text(msg);
                }
            },
            postonce: true,
            showAllError: true,
            callback: function () {
                save();
            }
        });
    });
    function save() {
        var context = UE.getEditor('editor').getContent();
        $("#context").val(context);          
	    $("#form").submit();       
    }
</script>
</body>
</html>
